Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Unix shell</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Unix_shell"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Unix_shell rootpage-Unix_shell skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Unix shell</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">

<p>A <b>Unix shell</b> is a <a href="Shell_(computing)" title="Shell (computing)">shell</a> that provides a <a href="Command-line_interface#Command-line_interpreter" title="Command-line interface">command-line</a> <a href="User_interface" title="User interface">user interface</a> for a <a href="Unix-like" title="Unix-like">Unix-like</a> <a href="Operating_system" title="Operating system">operating system</a>. A Unix shell provides a <a href="Command_language" title="Command language">command language</a> that can be used either <a href="Interactively" class="mw-redirect" title="Interactively">interactively</a> or for writing a <a href="Shell_script" title="Shell script">shell script</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> A user typically interacts with a Unix shell via a <a href="Terminal_emulator" title="Terminal emulator">terminal emulator</a>; however, direct access via serial hardware connections or <a href="Secure_Shell" title="Secure Shell">Secure Shell</a> are common for server systems. Although use of a Unix shell is popular with some users, others prefer to use a <a href="Windowing_system" title="Windowing system">windowing system</a> such as desktop <a href="Linux_distribution" title="Linux distribution">Linux distribution</a> or <a href="MacOS" title="MacOS">macOS</a> instead of a command-line interface.
</p><p>A user may have access to multiple Unix shells with one configured to run by default when the user <a href="Log_in" class="mw-redirect" title="Log in">logs in</a> interactively. The <a href="Default_(computer_science)" title="Default (computer science)">default</a> selection is typically stored in a user's profile; for example, in the local <style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */


.mw-parser-output .monospaced{font-family:monospace,monospace}


/* end https://en.wikipedia.org/ */
</style><span class="monospaced"><a href="Passwd_(file)" class="mw-redirect" title="Passwd (file)">passwd</a></span> file or in a distributed configuration system such as <a href="Network_Information_Service" title="Network Information Service">NIS</a> or <a href="Lightweight_Directory_Access_Protocol" title="Lightweight Directory Access Protocol">LDAP</a>. A user may use other shells <a href="Nesting_(computing)" title="Nesting (computing)">nested</a> inside the default shell.
</p><p>A Unix shell may provide many features including: <a href="Environment_variable" title="Environment variable">variable definition and substitution</a>, <a href="Command_substitution" title="Command substitution">command substitution</a>, <a href="Wildcard_character" title="Wildcard character">filename wildcarding</a>, <a href="Pipeline_(Unix)" title="Pipeline (Unix)">stream piping</a>, <a href="Control_flow" title="Control flow">control flow structures</a> (<a href="Conditional_(programming)" class="mw-redirect" title="Conditional (programming)">condition-testing</a> and <a href="Iteration" title="Iteration">iteration</a>), <a href="Working_directory" title="Working directory">working directory context</a>, and <a href="Here_document" title="Here document">here document</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Early_shells">Early shells</h2></div>
<p>The first Unix shell was the <a href="Thompson_shell" title="Thompson shell">Thompson shell</a>, <i>sh</i>, written by <a href="Ken_Thompson_(computer_programmer)" class="mw-redirect" title="Ken Thompson (computer programmer)">Ken Thompson</a> at <a href="Bell_Labs" title="Bell Labs">Bell Labs</a> and distributed with Versions 1 through 6 of Unix, from 1971 to 1975.<sup id="cite_ref-v6hist_3-0" class="reference"><a href="#cite_note-v6hist-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> Though rudimentary by modern standards, it introduced many of the basic features common to all later Unix shells, including piping, simple control structures using <code>if</code> and <code>goto</code>, and filename wildcarding. Though not in current use, it is still available as part of some <a href="Ancient_UNIX" class="mw-redirect" title="Ancient UNIX">Ancient UNIX</a> systems.
</p><p>It was modeled after the <a href="Multics" title="Multics">Multics</a> shell, developed in 1965 by American software engineer <a href="Glenda_Schroeder" title="Glenda Schroeder">Glenda Schroeder</a>. Schroeder's Multics shell was itself modeled after the <a href="RUNCOM" title="RUNCOM">RUNCOM</a> program <a href="Louis_Pouzin" title="Louis Pouzin">Louis Pouzin</a> showed to the Multics Team. The "rc" suffix on some Unix configuration files (e.g. ".bashrc" or ".vimrc"), is a remnant of the RUNCOM ancestry of Unix shells.<sup id="cite_ref-Vleck_1-1" class="reference"><a href="#cite_note-Vleck-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Pouzin_4-0" class="reference"><a href="#cite_note-Pouzin-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>The <a href="PWB_shell" title="PWB shell">PWB shell</a> or Mashey shell, <i>sh</i>, was an upward-compatible version of the Thompson shell, augmented by <a href="John_Mashey" title="John Mashey">John Mashey</a> and others and distributed with the <a href="PWB/UNIX" title="PWB/UNIX">Programmer's Workbench UNIX</a>, circa 1975–1977. It focused on making shell programming practical, especially in large shared computing centers. It added shell variables (precursors of <a href="Environment_variable" title="Environment variable">environment variables</a>, including the search path mechanism that evolved into $PATH), user-executable shell scripts, and interrupt-handling. Control structures were extended from if/goto to if/then/else/endif, switch/breaksw/endsw, and while/end/break/continue. As shell programming became widespread, these external commands were incorporated into the shell itself for performance.
</p><p>But the most widely distributed and influential of the early Unix shells were the <a href="Bourne_shell" title="Bourne shell">Bourne shell</a> and the <a href="C_shell" title="C shell">C shell</a>. Both shells have been used as the coding base and model for many derivative and work-alike shells with extended feature sets.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Bourne_shell">Bourne shell</h3></div>
<p>The <a href="Bourne_shell" title="Bourne shell">Bourne shell</a>, <i>sh</i>, was a new Unix shell by <a href="Stephen_R._Bourne" title="Stephen R. Bourne">Stephen Bourne</a> at Bell Labs.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> Distributed as the shell for UNIX Version 7 in 1979, it introduced the rest of the basic features considered common to all the later Unix shells, including <a href="Here_document" title="Here document">here documents</a>, <a href="Command_substitution" title="Command substitution">command substitution</a>, more generic <a href="Variable_(programming)" class="mw-redirect" title="Variable (programming)">variables</a> and more extensive builtin <a href="Control_flow" title="Control flow">control structures</a>. The language, including the use of a reversed keyword to mark the end of a block, was influenced by <a href="ALGOL_68" title="ALGOL 68">ALGOL 68</a>.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> Traditionally, the Bourne shell program name is <span class="monospaced">sh</span> and its path in the Unix file system hierarchy is <span class="monospaced">/bin/sh</span>. But a number of compatible work-alikes are also available with various improvements and additional features. On many systems, sh may be a <a href="Symbolic_link" title="Symbolic link">symbolic link</a> or <a href="Hard_link" title="Hard link">hard link</a> to one of these alternatives:
</p>
<ul><li><a href="Almquist_shell" title="Almquist shell">Almquist shell</a> (ash): written as a BSD-licensed replacement for the Bourne Shell; often used in resource-constrained environments. The sh of <a href="FreeBSD" title="FreeBSD">FreeBSD</a>, <a href="NetBSD" title="NetBSD">NetBSD</a> (and their derivatives) are based on ash that has been enhanced to be <a href="POSIX" title="POSIX">POSIX</a> conformant.
<ul><li><a href="Busybox" class="mw-redirect" title="Busybox">Busybox</a>: a set of Unix utilities for small and embedded systems, which includes 2 shells: ash, a derivative of the Almquist shell; and hush, an independent implementation of a Bourne shell.</li>
<li><a href="Debian_Almquist_shell" class="mw-redirect" title="Debian Almquist shell">Debian Almquist shell</a> (dash): a modern replacement for ash in <a href="Debian" title="Debian">Debian</a> and <a href="Ubuntu_(operating_system)" class="mw-redirect" title="Ubuntu (operating system)">Ubuntu</a></li></ul></li>
<li><a href="Bash_(Unix_shell)" title="Bash (Unix shell)">Bourne-Again shell</a> (bash): written as part of the <a href="GNU_Project" title="GNU Project">GNU Project</a> to provide a superset of Bourne Shell functionality. This shell can be found installed and is the default interactive shell for users on most <a href="Linux" title="Linux">Linux</a> systems; it provides both interactive mode (implemented by GNU Readline) or script-mode.</li>
<li><a href="KornShell" title="KornShell">KornShell</a> (ksh): written by <a href="David_Korn_(computer_scientist)" title="David Korn (computer scientist)">David Korn</a> based on the Bourne shell sources<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> while working at <a href="Bell_Labs" title="Bell Labs">Bell Labs</a></li>
<li><a href="Pdksh" class="mw-redirect" title="Pdksh">Public domain Korn shell</a> (pdksh)
<ul><li><a href="Mksh" class="mw-redirect" title="Mksh">MirBSD Korn shell</a> (mksh): a descendant of the <a href="OpenBSD" title="OpenBSD">OpenBSD</a> /bin/ksh and pdksh, developed as part of <a href="MirOS_BSD" title="MirOS BSD">MirOS BSD</a></li></ul></li>
<li><a href="Z_shell" title="Z shell">Z shell</a> (zsh): a relatively modern shell that is partially <a href="Backward_compatible" class="mw-redirect" title="Backward compatible">backward compatible</a> with <a href="Bash_(Unix_shell)" title="Bash (Unix shell)">bash</a>. It's the default shell in <a href="Kali_Linux" title="Kali Linux">Kali Linux</a> since 2020.4 and <a href="MacOS" title="MacOS">macOS</a> since 10.15 <a href="MacOS_Catalina" title="MacOS Catalina">Catalina</a>.</li></ul>
<p>The <a href="POSIX" title="POSIX">POSIX</a> standard specifies its standard shell as a strict subset of the <a href="KornShell" title="KornShell">Korn shell</a>, an enhanced version of the Bourne shell. From a user's perspective the Bourne shell was immediately recognized when active by its characteristic default command line prompt character, the dollar sign (<span class="monospaced">$</span>).
</p>
<div class="mw-heading mw-heading3"><h3 id="C_shell">C shell</h3></div>
<p>The <a href="C_shell" title="C shell">C shell</a>, <i>csh</i>, was modeled on the <a href="C_programming_language" class="mw-redirect" title="C programming language">C programming language</a>, including the control structures and the expression grammar. It was written by <a href="Bill_Joy" title="Bill Joy">Bill Joy</a> as a graduate student at <a href="University_of_California%2C_Berkeley" title="University of California, Berkeley">University of California, Berkeley</a>, and was widely distributed with <a href="Berkeley_Software_Distribution" title="Berkeley Software Distribution">BSD Unix</a>.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p><p>The C shell also introduced many features for interactive work, including the <a href="C_shell#History" title="C shell">history</a> and <a href="C_shell#Editing_operators" title="C shell">editing</a> mechanisms, <a href="C_shell#Aliases" title="C shell">aliases</a>, <a href="C_shell#Directory_stack" title="C shell">directory stacks</a>, <a href="C_shell#Tilde_notation" title="C shell">tilde notation</a>, <a href="C_shell#Cdpath" title="C shell">cdpath</a>, <a href="C_shell#Job_control" title="C shell">job control</a> and <a href="C_shell#Path_hashing" title="C shell">path hashing</a>. On many systems, csh may be a <a href="Symbolic_link" title="Symbolic link">symbolic link</a> or <a href="Hard_link" title="Hard link">hard link</a> to <a href="TENEX_C_shell" class="mw-redirect" title="TENEX C shell">TENEX C shell</a> (tcsh), an improved version of Joy's original version. Although the interactive features of csh have been copied to most other shells, the language structure has not been widely copied. The only work-alike is <a href="Hamilton_C_shell" title="Hamilton C shell">Hamilton C shell</a>, written by Nicole Hamilton, first distributed on <a href="OS/2" title="OS/2">OS/2</a> in 1988 and on <a href="Windows" class="mw-redirect" title="Windows">Windows</a> since 1992.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Configuration_files">Configuration files</h2></div>
<p>Shells read configuration files in various circumstances. These files usually contain commands for the shell and are executed when loaded; they are usually used to set important variables used to find executables, like <a href="%24PATH" class="mw-redirect" title="$PATH">$PATH</a>, and others that control the behavior and appearance of the shell. The table in this section shows the configuration files for popular shells.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p>
<table class="wikitable floatleft sortable" style="text-align: center; margin-right: 2em;">

<tbody><tr>
<th>Configuration file
</th>
<th><a href="Bourne_shell" title="Bourne shell">sh</a>
</th>
<th><a href="KornShell" title="KornShell">ksh</a>
</th>
<th><a href="C_shell" title="C shell">csh</a>
</th>
<th><a href="Tcsh" title="Tcsh">tcsh</a>
</th>
<th><a href="Bash_(Unix_shell)" title="Bash (Unix shell)">bash</a>
</th>
<th><a href="Z_shell" title="Z shell">zsh</a>
</th></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/.login</span>
</td>
<td>
</td>
<td>
</td>
<td>login
</td>
<td>login
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/csh.cshrc</span>
</td>
<td>
</td>
<td>
</td>
<td>yes
</td>
<td>yes
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/csh.login</span>
</td>
<td>
</td>
<td>
</td>
<td>login
</td>
<td>login
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.tcshrc</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>yes
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.cshrc</span>
</td>
<td>
</td>
<td>
</td>
<td>yes
</td>
<td>yes<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>a<span class="cite-bracket">]</span></a></sup>
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/ksh.kshrc</span>
</td>
<td>
</td>
<td>int.
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/sh.shrc</span>
</td>
<td>int.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>b<span class="cite-bracket">]</span></a></sup>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">$ENV</span> (typically <span class="monospaced">~/.kshrc</span>)<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</td>
<td>int.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>c<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>d<span class="cite-bracket">]</span></a></sup>
</td>
<td>int.
</td>
<td>
</td>
<td>
</td>
<td>int.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>e<span class="cite-bracket">]</span></a></sup>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.login</span>
</td>
<td>
</td>
<td>
</td>
<td>login
</td>
<td>login
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.logout</span>
</td>
<td>
</td>
<td>
</td>
<td>login
</td>
<td>login
</td>
<td>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/profile</span>
</td>
<td>login
</td>
<td>login
</td>
<td>
</td>
<td>
</td>
<td>login
</td>
<td>login<sup id="cite_ref-zsh_profiles_20-0" class="reference"><a href="#cite_note-zsh_profiles-20"><span class="cite-bracket">[</span>f<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.profile</span>
</td>
<td>login
</td>
<td>login
</td>
<td>
</td>
<td>
</td>
<td>login<sup id="cite_ref-bash_profiles_21-0" class="reference"><a href="#cite_note-bash_profiles-21"><span class="cite-bracket">[</span>g<span class="cite-bracket">]</span></a></sup>
</td>
<td>login<sup id="cite_ref-zsh_profiles_20-1" class="reference"><a href="#cite_note-zsh_profiles-20"><span class="cite-bracket">[</span>f<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.bash_profile</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login<sup id="cite_ref-bash_profiles_21-1" class="reference"><a href="#cite_note-bash_profiles-21"><span class="cite-bracket">[</span>g<span class="cite-bracket">]</span></a></sup>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.bash_login</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login<sup id="cite_ref-bash_profiles_21-2" class="reference"><a href="#cite_note-bash_profiles-21"><span class="cite-bracket">[</span>g<span class="cite-bracket">]</span></a></sup>
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.bash_logout</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.bashrc</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>int.+n/login
</td>
<td>
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/zshenv</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>yes
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/zprofile</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/zshrc</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>int.
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/zlogin</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">/etc/zlogout</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.zshenv</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>yes
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.zprofile</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.zshrc</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>int.
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.zlogin</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td></tr>
<tr>
<td style="text-align:left;"><span class="monospaced">~/.zlogout</span>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>login
</td></tr></tbody></table>
<p>Explanation:
</p>
<ul><li>blank means a file is not read by a shell at all.</li>
<li>"yes" means a file is always read by a shell upon startup.</li>
<li>"login" means a file is read if the shell is a login shell.</li>
<li>"n/login" means a file is read if the shell is not a login shell.</li>
<li>"int." means a file is read if the shell is interactive.</li></ul>
<div style="clear:both;" class=""></div><style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-lower-alpha">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text">only if <span class="monospaced">~/.tcshrc</span> not found</span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text">Newer versions of the Bourne Shell only</span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text">Available on systems that support the "User Portability Utilities option"; value of the variable must be an <i>absolute</i> path, and it is ignored "if the user's real and effective user IDs or real and effective group IDs are different."<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><span class="monospaced">$ENV</span> is <span class="monospaced">$HOME/.shrc</span> in newer versions of the Bourne Shell</span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text">Same behavior as <span class="monospaced">sh</span>, but only if invoked as <span class="monospaced">sh</span> (bash 2+) or, since bash 4.2, also if invoked <i>explicitly</i> in POSIX compatibility mode (with options <span class="monospaced">--posix</span> or <span class="monospaced">-o posix</span>).<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup></span>
</li>
<li id="cite_note-zsh_profiles-20"><span class="mw-cite-backlink">^ <a href="#cite_ref-zsh_profiles_20-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-zsh_profiles_20-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">Only in sh/ksh compatibility mode (when invoked as bash, sh, ksh)</span>
</li>
<li id="cite_note-bash_profiles-21"><span class="mw-cite-backlink">^ <a href="#cite_ref-bash_profiles_21-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-bash_profiles_21-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-bash_profiles_21-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text">The first readable file in order of <span class="monospaced">~/.bash_profile</span>, <span class="monospaced">~/.bash_login</span> and <span class="monospaced">~/.profile</span>; and only <span class="monospaced">~/.profile</span> if invoked as <span class="monospaced">sh</span> or, as of at least Bash 4.2, if invoked <i>explicitly</i> in POSIX compatibility mode (with options <span class="monospaced">--posix</span> or <span class="monospaced">-o posix</span>)</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="Other_shells">Other shells</h2></div>
<p>Variations on the Unix shell concept that don't derive from Bourne shell or C shell include the following:<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><a href="Es_(Unix_shell)" class="mw-redirect" title="Es (Unix shell)">es</a> – A <a href="Functional_programming" title="Functional programming">functional programming</a> rc-compatible shell written in the mid-1990s.</li>
<li><a href="Friendly_interactive_shell" class="mw-redirect" title="Friendly interactive shell">Friendly interactive shell</a> (fish) – First released in 2005.</li>
<li><a href="PowerShell" title="PowerShell">PowerShell</a> – An <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented</a> shell developed originally for Windows OS and now available to macOS and Linux.</li>
<li><a href="Qshell" title="Qshell">Qshell</a> – A shell on the <a href="IBM_i" title="IBM i">IBM i</a> operating system based on <a href="POSIX" title="POSIX">POSIX</a> and <a href="X/Open" title="X/Open">X/Open</a> standards.</li>
<li><a href="Rc_shell" class="mw-redirect" title="Rc shell">rc</a> – The default shell on <a href="Plan_9_from_Bell_Labs" title="Plan 9 from Bell Labs">Plan 9 from Bell Labs</a> and <a href="Version_10_Unix" class="mw-redirect" title="Version 10 Unix">Version 10 Unix</a> written by <a href="Tom_Duff" title="Tom Duff">Tom Duff</a>. Ports have been made to various <a href="Unix-like" title="Unix-like">Unix-like</a> operating systems.</li>
<li><a href="Scsh" title="Scsh">scsh</a> – A <a href="Scheme_(programming_language)" title="Scheme (programming language)">Scheme</a> Shell.</li>
<li><a href="Wish_(Unix_shell)" title="Wish (Unix shell)">wish</a> – A windowing shell for <a href="Tcl/Tk" class="mw-redirect" title="Tcl/Tk">Tcl/Tk</a>.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1184024115">
/* start https://en.wikipedia.org/ */


.mw-parser-output .div-col{margin-top:0.3em;column-width:30em}.mw-parser-output .div-col-small{font-size:90%}.mw-parser-output .div-col-rules{column-rule:1px solid #aaa}.mw-parser-output .div-col dl,.mw-parser-output .div-col ol,.mw-parser-output .div-col ul{margin-top:0}.mw-parser-output .div-col li,.mw-parser-output .div-col dd{page-break-inside:avoid;break-inside:avoid-column}


/* end https://en.wikipedia.org/ */
</style><div class="div-col" style="column-width: 30em;">
<ul><li><a href="Comparison_of_command_shells" title="Comparison of command shells">Comparison of command shells</a></li>
<li><a href="List_of_POSIX_commands" title="List of POSIX commands">List of POSIX commands</a></li>
<li><a href="Read%E2%80%93eval%E2%80%93print_loop" title="Read–eval–print loop">Read–eval–print loop</a>&nbsp;– Computer programming environment</li>
<li><a href="Restricted_shell" title="Restricted shell">Restricted shell</a></li>
<li><a href="Shell_account" title="Shell account">Shell account</a>&nbsp;– User account on a remote server</li>
<li><a href="Shell_script" title="Shell script">Shell script</a>&nbsp;– Script written for an operating system shell</li>
<li><a href="Shell_shoveling" title="Shell shoveling">Shell shoveling</a>&nbsp;– Redirecting the input and output of a shell to a service so that it can be remotely accessed</li></ul></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-Vleck-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-Vleck_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Vleck_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFTom_Van_Vleck1995" class="citation web cs1">Tom Van Vleck (1995-02-05). <a rel="nofollow" class="external text" href="http://www.multicians.org/unix.html">"Unix and Multics"</a>. Multicians.org<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-08-14</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFBourne,_Stephen_R.1983" class="citation news cs1">Bourne, Stephen R. (October 1983). <a rel="nofollow" class="external text" href="https://archive.org/stream/byte-magazine-1983-10/1983_10_BYTE_08-10_UNIX#page/n187/mode/2up">"The Unix Shell"</a>. <i>BYTE</i>. p.&nbsp;187<span class="reference-accessdate">. Retrieved <span class="nowrap">30 January</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-v6hist-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-v6hist_3-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://v6shell.org/history/">"V6 Thompson Shell Port - History"</a>. V6shell.org<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-08-14</span></span>.</cite></span>
</li>
<li id="cite_note-Pouzin-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-Pouzin_4-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFLouis_Pouzin2000" class="citation web cs1">Louis Pouzin (2000-11-25). <a rel="nofollow" class="external text" href="http://www.multicians.org/shell.html">"The Origin of the Shell"</a>. Multicians.org<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-08-14</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite id="CITEREFNikolai_Bezroukov2015" class="citation web cs1"><a href="Nikolai_Bezroukov" title="Nikolai Bezroukov">Nikolai Bezroukov</a> (2015-08-13). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220608181527/http://www.softpanorama.org/People/Shell_giants/introduction.shtml">"Introduction to the Unix shell history"</a>. Softpanorama. Archived from <a rel="nofollow" class="external text" href="http://www.softpanorama.org/People/Shell_giants/introduction.shtml">the original</a> on 2022-06-08<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-08-21</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFBourne2009" class="citation interview cs1"><a href="Stephen_R._Bourne" title="Stephen R. Bourne">Bourne, Stephen</a> (2009-03-05). <a rel="nofollow" class="external text" href="https://www2.computerworld.com.au/article/279011/a-z_programming_languages_bourne_shell_sh/">"The A-Z of Programming Languages: Bourne shell, or sh"</a> (Interview). Interviewed by Howard Dahdah. <a href="Computerworld" title="Computerworld">Computerworld</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-08-16</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://groups.google.com/group/comp.lang.misc/msg/d58db4799c33e093?hl=en&amp;dmode=source">"<i>Re: Late Bloomers Revisited</i>"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">20 September</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text">
<cite id="CITEREFKorn1994" class="citation cs2">Korn, David G. (October 26, 1994), <a rel="nofollow" class="external text" href="https://www.usenix.org/legacy/publications/library/proceedings/vhll/full_papers/korn.ksh.a">"ksh - An Extensible High Level Language"</a>, <i>Proceedings of the USENIX 1994 Very High Level Languages Symposium</i>, USENIX Association<span class="reference-accessdate">, retrieved <span class="nowrap">February 5,</span> 2015</span>, <q>Instead of inventing a new script language, we built a form entry system by modifying the Bourne shell, adding built-in commands as necessary.</q></cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text">Harley Hahn, <a rel="nofollow" class="external text" href="https://www.harley.com/unix-book/book/chapters/h.html">Harley Hahn's Guide to Unix and Linux: Unix/Linux Timeline</a>.</span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://hamiltonlabs.com/ReleaseNotes.htm">"Hamilton C shell for Windows Release Notes 4.0"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">20 September</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20160403120601/http://www.unixnote.com/2010/05/different-unix-shell.html">"Different UNIX Shells"</a>. unixnote.com. 2010. Archived from <a rel="nofollow" class="external text" href="http://www.unixnote.com/2010/05/different-unix-shell.html">the original</a> on 2016-04-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-08-21</span></span>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text">SCO Unix Group, <a rel="nofollow" class="external text" href="http://unix.harley.com/instructors/timeline.html">SCO Unixware 7 documentation, 22 Apr 2004, retrieved 18 Oct 2012</a>.</span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03">"Shell Command Language"</a>. <i>opengroup.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">15 June</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html">"Bash Reference Manual: Bash Startup Files"</a>. <i>gnu.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">15 June</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210112142623/http://www.freebsd.org/ports/shells.html">"FreeBSD Ports: Shells"</a>. Freebsd.org. 2014-03-30. Archived from <a rel="nofollow" class="external text" href="http://www.freebsd.org/ports/shells.html">the original</a> on 2021-01-12<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-04-05</span></span>.</cite></span>
</li>
</ol></div></div>
<div style="clear:both;" class=""></div>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Unix_shells49" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div id="Unix_shells49" style="font-size:114%;margin:0 4em"></div></th></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Almquist_shell" title="Almquist shell">Almquist</a></li>
<li><a href="Bash_(Unix_shell)" title="Bash (Unix shell)">Bash</a></li>
<li><a href="Bourne_shell" title="Bourne shell">Bourne</a></li>
<li><a href="C_shell" title="C shell">csh</a></li>
<li><a href="Fish_(Unix_shell)" title="Fish (Unix shell)">fish</a></li>
<li><a href="Hamilton_C_shell" title="Hamilton C shell">Hamilton</a></li>
<li><a href="KornShell" title="KornShell">Korn</a></li>
<li><a href="PWB_shell" title="PWB shell">PWB</a></li>
<li><a href="Qshell" title="Qshell">Qshell</a></li>
<li><a href="Rc_(Unix_shell)" title="Rc (Unix shell)">rc</a></li>
<li><a href="Stand-alone_shell" title="Stand-alone shell">sash</a></li>
<li><a href="Tcsh" title="Tcsh">tcsh</a></li>
<li><a href="Thompson_shell" title="Thompson shell">Thompson</a></li>
<li><a href="Wish_(Unix_shell)" title="Wish (Unix shell)">Wish</a></li>
<li><a href="Z_shell" title="Z shell">Zsh</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="Comparison_of_command_shells" title="Comparison of command shells">Comparison of command shells</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Unix_and_Unix-like_operating_systems_and_compatibility_layers622" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Unix_and_Unix-like_operating_systems_and_compatibility_layers622" style="font-size:114%;margin:0 4em"><a href="Unix" title="Unix">Unix</a> and <a href="Unix-like" title="Unix-like">Unix-like</a> <a href="Operating_system" title="Operating system">operating systems</a> and <a href="Compatibility_layer" title="Compatibility layer">compatibility layers</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="Unix_architecture" title="Unix architecture">Architecture</a></li>
<li><a href="Unix_filesystem" title="Unix filesystem">Filesystem</a></li>
<li><a href="History_of_Unix" title="History of Unix">History</a></li>
<li><a href="Unix_philosophy" title="Unix philosophy">Philosophy</a></li>
<li><a href="Unix_security" title="Unix security">Security</a></li>
</ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Operating_system" title="Operating system">Operating<br>systems</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><i><b><a href="Berkeley_Software_Distribution" title="Berkeley Software Distribution">BSD</a></b></i></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><i><a href="386BSD" title="386BSD">386BSD</a></i>
<ul><li><a href="FreeBSD" title="FreeBSD">FreeBSD</a></li>
<li><a href="NetBSD" title="NetBSD">NetBSD</a></li>
<li><a href="OpenBSD" title="OpenBSD">OpenBSD</a></li>
<li><a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a></li></ul></li>
<li><a href="Darwin_(operating_system)" title="Darwin (operating system)">Darwin</a>
<ul><li><a href="MacOS" title="MacOS">macOS</a></li>
<li><a href="IOS" title="IOS">iOS</a></li>
<li><a href="AudioOS" class="mw-redirect" title="AudioOS">audioOS</a></li>
<li><a href="IPadOS" title="IPadOS">iPadOS</a></li>
<li><a href="TvOS" title="TvOS">tvOS</a></li>
<li><a href="WatchOS" title="WatchOS">watchOS</a></li>
<li><a href="BridgeOS" title="BridgeOS">bridgeOS</a></li></ul></li>
<li><i><a href="DYNIX" title="DYNIX">DYNIX</a></i></li>
<li><i><a href="NeXTSTEP" title="NeXTSTEP">NeXTSTEP</a></i></li>
<li><i><a href="SunOS" title="SunOS">SunOS</a></i></li>
<li><i><a href="Ultrix" title="Ultrix">Ultrix</a></i></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><b><a href="Linux" title="Linux">Linux</a></b></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Android_(operating_system)" title="Android (operating system)">Android</a></li>
<li><a href="Arch_Linux" title="Arch Linux">Arch</a></li>
<li><a href="ChromeOS" title="ChromeOS">ChromeOS</a></li>
<li><a href="Debian" title="Debian">Debian</a></li>
<li><a href="Fedora_Linux" title="Fedora Linux">Fedora</a></li>
<li><a href="Gentoo_Linux" title="Gentoo Linux">Gentoo</a></li>
<li><a href="Red_Hat_Enterprise_Linux" title="Red Hat Enterprise Linux">Red Hat</a></li>
<li><a href="Slackware" title="Slackware">Slackware</a></li>
<li><a href="SUSE_Linux" class="mw-redirect" title="SUSE Linux">SUSE</a></li>
<li><a href="Ubuntu" title="Ubuntu">Ubuntu</a></li>
<li><a href="List_of_Linux_distributions" title="List of Linux distributions">Other distributions</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><i><b><a href="UNIX_System_V" title="UNIX System V">System V</a></b></i></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><i><a href="A/UX" title="A/UX">A/UX</a></i></li>
<li><a href="IBM_AIX" title="IBM AIX">AIX</a></li>
<li><a href="HP-UX" title="HP-UX">HP-UX</a></li>
<li><i><a href="IRIX" title="IRIX">IRIX</a></i></li>
<li><a href="OpenServer" title="OpenServer">OpenServer</a></li>
<li><a href="Oracle_Solaris" title="Oracle Solaris">Solaris</a>
<ul><li><i><a href="OpenSolaris" title="OpenSolaris">OpenSolaris</a></i></li>
<li><a href="Illumos" title="Illumos">Illumos</a></li></ul></li>
<li><i><a href="Tru64_UNIX" title="Tru64 UNIX">Tru64 UNIX</a></i></li>
<li><i><a href="UnixWare" title="UnixWare">UnixWare</a></i></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><i><a href="Coherent_(operating_system)" title="Coherent (operating system)">Coherent</a></i></li>
<li><a href="Domain/OS" title="Domain/OS">Domain/OS</a></li>
<li><a href="GNU" title="GNU">GNU</a>
<ul><li><a href="GNU_Hurd" title="GNU Hurd">Hurd</a></li></ul></li>
<li><a href="LynxOS" title="LynxOS">LynxOS</a></li>
<li><a href="Minix" title="Minix">Minix</a></li>
<li><i><a href="MOS_(operating_system)" title="MOS (operating system)">MOS</a></i></li>
<li><i><a href="OSF/1" title="OSF/1">OSF/1</a></i></li>
<li><a href="QNX" title="QNX">QNX</a>
<ul><li><i><a href="BlackBerry_10" title="BlackBerry 10">BlackBerry 10</a></i></li></ul></li>
<li><i><a href="Research_Unix" title="Research Unix">Research Unix</a></i></li>
<li><a href="SerenityOS" title="SerenityOS">SerenityOS</a></li>
<li><i><a href="Xenix" title="Xenix">Xenix</a></i></li>
<li><a href="List_of_Unix_systems" title="List of Unix systems">more...</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Compatibility_layer" title="Compatibility layer">Compatibility<br>layers</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Cygwin" title="Cygwin">Cygwin</a></li>
<li><a href="Darling_(software)" title="Darling (software)">Darling</a></li>
<li><i><a href="Eunice_(software)" title="Eunice (software)">Eunice</a></i></li>
<li><i><a href="OpenVMS#Cross_platform_compatibility" title="OpenVMS">GNV</a></i></li>
<li><i><a href="Interix" title="Interix">Interix</a></i></li>
<li><i><a href="MachTen" title="MachTen">MachTen</a></i></li>
<li><i><a href="Microsoft_POSIX_subsystem" title="Microsoft POSIX subsystem">Microsoft POSIX subsystem</a></i></li>
<li><i><a href="MKS_Toolkit" title="MKS Toolkit">MKS Toolkit</a></i></li>
<li><i><a href="IBM_i#PASE" title="IBM i">PASE</a></i></li>
<li><i><a href="P.I.P.S." title="P.I.P.S.">P.I.P.S.</a></i></li>
<li><i><a href="PWS/VSE-AF" class="mw-redirect" title="PWS/VSE-AF">PWS/VSE-AF</a></i></li>
<li><a href="UNIX_System_Services" title="UNIX System Services">UNIX System Services</a></li>
<li><a href="UserLAnd_Technologies" title="UserLAnd Technologies">UserLAnd Technologies</a></li>
<li><i><a href="Windows_Services_for_UNIX" title="Windows Services for UNIX">Windows Services for UNIX</a></i></li>
<li><a href="Windows_Subsystem_for_Linux" title="Windows Subsystem for Linux">Windows Subsystem for Linux</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><i>Italics</i> indicate discontinued systems. <span class="noviewer" typeof="mw:File"><span title="Category"></span></span> <b>Category</b></li>
<li><span class="noviewer" typeof="mw:File"><span title="Commons page"></span></span> <b><a href="https://commons.wikimedia.org/wiki/Category:Unix" class="extiw external" title="commons:Category:Unix">Commons</a></b></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-29" href="https://en.wikipedia.org/wiki/?title=Unix_shell&amp;oldid=1303147381">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>